{% extends "../../theme/calcubic_edit.html" %}


{% block zhuti %}


<div class="panel panel-black">
    <div class="panel-heading">
        {{ dbrec.title }}－修改

    </div>
    <div class="panel-body">
        <form action="" method="post" class="form-horizontal" id="form_post">
            <fieldset>
                <input type="hidden" id="id_post" name="id_post" value="{{ dbrec.uid }}">

                <div class="form-group">
                    <label class="col-sm-2 control-label" for="title">标题</label>

                    <div class="col-sm-10">
                        <input class="form-control" type="text" id="title" name="title" value="{{ dbrec.title }}">
                    </div>
                </div>


                <div class="form-group">
                    <label for="tags" class="col-sm-2 control-label">标签</label>

                    <div class="col-sm-10">
                        <input type="text" id="tags" name="tags" class="form-control" value="{% for x in app2label_info %}
                {{ x.tag.name}},
                {% end  %}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label" for="keywords">关键词</label>

                    <div class="col-sm-10">
                        <input class="form-control" id="keywords" name="keywords" type="text"
                               value="{{ dbrec.keywords }}">
                    </div>
                </div>


                {% for ii in range(0,5) %}
                <div class="form-group">
                    {% if ii == 0 %}
                    <label for="pcat0" class="col-sm-2 control-label">标签</label>
                    {% else %}
                    <label class="col-sm-2 control-label"></label>
                    {% end %}

                    <div class="col-sm-4">
                        <select name="gcat{{ii}}" id="gcat{{ii}}" class="form-control" >
                            <option value="0">请选择</option>


                            {% for taginfo in tag_infos %}
                            <option value="{{ taginfo.uid }}"
                                    {% for tt in app2tag_info %}
                                    {% if tt.order== ii and tt.tag.uid== taginfo.uid %}
                                    selected
                                    {% end %}
                                    {% end %}  >{{ taginfo.name }}
                            </option>
                            {% end %}

                        </select>
                    </div>

                </div>
                {% end %}

                <div class="form-group">
                    <label class="col-sm-2 control-label" for="logo">特色图片</label>

                    <div class="col-sm-10">
                        <input class="form-control" id="logo" name="logo" type="text" value="{{ dbrec.logo }}">
                    </div>
                </div>

                <div class="form-group">


                    <label class="col-sm-2 control-label" for="up"></label>

                    <div class="col-sm-10">

                <span id="up"><a href="/entry/add" target="_blank"
                                 class="btn btn-primary">上传图片</a></span>

                    </div>
                </div>

                <div class="form-group">

                    <label class="col-sm-2 control-label" for="cnt_md">内容</label>

                    <div class="col-sm-10">

                        <textarea class="form-control" rows=26 id="cnt_md" name="cnt_md">
                            {% raw unescape(dbrec.cnt_md) %}</textarea>
                    </div>
                </div>


                <div class="form-group">


                    <label class="col-sm-2 control-label" for="is_update_time">更新编辑时间</label>

                    <div class="col-sm-10">

                        <input id="is_update_time" type="radio" name="is_update_time" value="1" checked>更新
                        <input id="is_update_time" type="radio" name="is_update_time" value="0">不更新

                    </div>
                </div>

                <div class="form-group">


                    <label class="col-sm-2 control-label" for="sub1"></label>

                    <div class="col-sm-10">

                        <input id="sub1" type="submit" value="更新数据" class="btn btn-primary">
                    </div>
                </div>

            </fieldset>

        </form>
    </div>
</div>
{% end %}


